package cn.isjinhao.se.sql.function.evaluator;

import cn.isjinhao.se.sql.function.handler.FunctionHandler;
import cn.isjinhao.se.sql.grammar.statement.CurdStatementType;
import cn.isjinhao.se.sql.grammar.statement.Function;
import cn.isjinhao.se.structure.ResultType;

import java.util.Map;
import java.util.Set;

/**
 * @Author ISJINHAO
 * @Date 2021/4/11 14:02
 */
public interface FunctionEvaluator {

    FunctionHandler getFunctionHandler(String functionName);

    Set<String> functionNameSet();

    Map<String, ResultType> functionNameResultType();

    void staticCheck(Function function, CurdStatementType type);

    Object evaluate(Function function, CurdStatementType type, Object... parameters);

    void addFunctionHandler(Class<? extends FunctionHandler> functionHandlerClass);

}
